<template>
	<view class="container">
		<view class="header">
			<text class="title">维修登记</text>
		</view>

		<view class="repair-input">
			<input class="input" type="text" v-model="repairDescription" placeholder="请输入需要维修的内容" />
		</view>

		<button class="submit-btn" @click="handleSubmit">提交</button>
	</view>
</template>

<script>
export default {
	data() {
		return {
			repairDescription: ''
		}
	},
	methods: {
		handleSubmit() {
			if (!this.repairDescription.trim()) {
				uni.showToast({
					title: '请输入维修内容',
					icon: 'none'
				});
				return;
			}

			// 模拟提交成功
			uni.showToast({
				title: '提交成功（模拟）',
				icon: 'success'
			});
			setTimeout(() => {
				uni.navigateBack();
			}, 1500);
		}
	}
}
</script>

<style>
.container {
	padding: 40rpx;
}

.header {
	margin-bottom: 40rpx;
}

.title {
	font-size: 44rpx;
	font-weight: 500;
	color: #333;
	text-align: center;
}

.repair-input {
	background: #fff;
	border-radius: 16rpx;
	padding: 40rpx;
	margin-bottom: 40rpx;
	box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
}

.input {
	width: 100%;
	padding: 20rpx;
	background: #f8f9fa;
	border-radius: 8rpx;
	font-size: 32rpx;
	color: #333;
}

.submit-btn {
	width: 100%;
	background-color: #07c160;
	color: #fff;
	font-size: 34rpx;
	padding: 30rpx 0;
	border-radius: 8rpx;
	border: none;
}

.submit-btn:active {
	background-color: #06ad56;
	transform: scale(0.98);
}
</style> 